Repository navigation
chore(deps): upgrade ed25519-dalek to 3.0 and curve25519-dalek to 5 - #175
Merged
Merged
Conversation
Move the hash, HMAC and PBKDF2 crates onto the digest 0.11 stack: sha2 0.10 -> 0.11.2, sha3 0.10 -> 0.12.0, blake2 0.10 -> 0.11.0, hmac 0.12 -> 0.13.0, pbkdf2 0.12 -> 0.13.0. - Drop the `sha2-hkdf` alias now that `sha2` itself is 0.11, and switch the `sha2_hkdf::` imports in src/kdf/hkdf.rs, src/key_exchange/x25519.rs and the key_exchange/symmetric tests back to `sha2::`. - hmac 0.13 moved `new_from_slice` to the `KeyInit` trait; import it. - sha3 0.12 no longer exposes a block-level core, so `Sha3_256` does not satisfy `EagerHash` and can't be used with `Hmac` / `pbkdf2_hmac_array`. PBKDF2-HMAC-SHA3-256 now uses `pbkdf2::<SimpleHmac<Sha3_256>>`, which computes the same HMAC and writes straight into the returned Vec. The PBKDF2 known-answer vectors pass unchanged. - Targeted lockfile refreshes: hpke 0.15.2, uuid 1.29.3, zeroize 1.9.2 (zeroize_derive 1.5.0). No public API changes. Part of #167 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ed25519-dalek 2.2 -> 3.0 (curve25519-dalek 5, sha2 0.11). Drop the `rand_core` feature: key generation now draws the 32-byte secret with getrandom::fill into a Zeroizing buffer and builds the key with SigningKey::from_bytes, which is what SigningKey::generate does. - Both verify functions keep verify_strict (#118); its logic is unchanged between 2.2.0 and 3.0.0. - Dev-dependency curve25519-dalek 4 -> 5; the tests need no API changes. - Add RFC 8032 section 7.1 known-answer tests (TEST 1-3) that pin the secret-key, public-key and signature encodings. They pass on both ed25519-dalek 2.2.0 and 3.0.0. curve25519-dalek 4.1.3 and fiat-crypto 0.2 leave the dependency tree. Part of #169 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WingZer0o
added a commit
that referenced
this pull request
Nov 27, 2026
Resolve the adjacent-line Cargo.toml conflict: keep #175's getrandom comment (now also naming PBKDF2 salts) and this branch's scrypt 0.12 line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 27, 2026
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rand_corefeature is no longer enabled:get_ed25519_key_pairnow draws the 32-byte secret withgetrandom::fillinto aZeroizingbuffer and builds the key withSigningKey::from_bytes. That is whatSigningKey::generatedoes internally, except thatgenerateleaves its copy of the secret on the stack.ed25519_verify_with_key_pairanded25519_verify_with_public_keystill callverify_strict(Security (Low):ed25519_verify_with_key_pairuses permissive (non-strict) verification #118). I diffedVerifyingKey::verify_strictandVerifyingKey::from_bytesbetween 2.2.0 and 3.0.0: the logic is the same (small-order R / weak-key rejection, canonical S, compressed-R comparison).Scalar::from_bytes_mod_order{,_wide}andMontgomeryPoint::mul_clampedhave the same signatures, sotests/signatures.rsandtests/key_exchange.rscompile without changes.cargo tree -i curve25519-dalek@4.1.3now finds nothing.curve25519-dalek 4.1.3,fiat-crypto 0.2.9,ed25519 2.2.3and their dependency onsignature 2/pkcs8 0.10leave the lockfile (signature 2andpkcs8 0.10stay in the tree because other crates still use them).randstays inCargo.toml(Upgrade rand 0.8 to 0.10 (or replace it with getrandom 0.4) once the RustCrypto stack is migrated #172). No other crate versions change.Public API
No changes.
get_ed25519_key_pair()is still infallible. Like before (rand0.8OsRng) and like x25519-dalek'sStaticSecret::random, it panics only if the OS RNG fails; that is now stated in a# Panicsdoc section.docs/EXAMPLES.mdneeds no update.Compatibility evidence
signatures::rfc8032_known_answer_vectors: RFC 8032 section 7.1 TEST 1, 2 and 3. For each vector it signs with the secret key and checks that the returned public key and signature match the RFC bytes exactly, checks that both verify functions accept, and checks that a tampered signature is rejected. Ed25519 signing is deterministic, so this pins the secret-key, public-key and signature encodings.ed25519_test.json(C2SP/wycheproof@65ca494) passes, as do the existing small-order-R and non-canonical-R strict-verification tests.Test results (Windows, local)
cargo build --release --locked: OK, no warningscargo test --release --locked: 229 passed, 0 failed across 18 test binaries (signatures: 6, which includes the new RFC 8032 test; wycheproof: 21; zeroize: 8; key_exchange: 7)cargo audit --deny unsound --deny yanked: exit 0Stacking
This PR is stacked on #173 (digest 0.11 upgrade). It targets
deps/rustcrypto-upgrades, and the diff includes #173's commit until #173 merges.Part of #169
🤖 Generated with Claude Code